<?php
namespace app\common\validate;

use think\Validate;

class Common extends Validate
{
    protected $rule = [
        ['id'  ,'number','参数错误'],
        ['shopid'  ,'number|require|gt:0','参数错误|参数错误|参数错误'],
        ['lat'  ,'number','参数错误|参数错误'],
        ['lon'  ,'number','参数错误|参数错误'],
        ['raidus'  ,'number','参数错误|参数错误'],
        ['aid'  ,'number','地域参数错误'],
        ['date','date','日期格式错误'],
        ['username','alphaDash','参数错误']
    ];

    protected $scene = [
        'common'       =>  ['id'],
        'shopid'       =>  ['shopid'],
        'username'    =>  ['username'],
        'date'=>    ['date'],
        'aid'       =>  ['aid'],
        'nearby'       =>  ['lat','lon','raidus']
    ];
}